//
//  BSNavigationController.m
//  BaiSiBuDeJie
//
//  Created by 蔡一凡 on 8/22/16.
//  Copyright © 2016 tsaievan. All rights reserved.
//

#import "BSNavigationController.h"

@interface BSNavigationController ()

@end

@implementation BSNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    NSInteger count = self.childViewControllers.count;
    
    NSLog(@"---%@", @(count));
    if (count >= 1) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    
    
    
    [super pushViewController:viewController animated:animated];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
